const adminRouter = require('./admin');
const bannerRouter = require('./banner');
const captchaRouter = require('./captcha');
const uploadRouter = require('./upload');
const blogRouter = require('./blog');
const blogTypeRouter = require('./blogType');
const projectRouter = require('./project');
const settingRouter = require('./setting');
const aboutRouter = require('./about');
const messageRouter = require('./message');

module.exports = (app) => {
	// 使用路由中间件
	app.use('/api/admin', adminRouter);
	app.use('/api/banner', bannerRouter);
	app.use('/api/upload', uploadRouter);
	app.use('/api/blog', blogRouter);
	app.use('/api/blogtype', blogTypeRouter);
	app.use('/api/project', projectRouter);
	app.use('/res/captcha', captchaRouter);
	app.use('/api/setting', settingRouter);
	app.use('/api/about', aboutRouter);
	app.use('/api/message', messageRouter);
	app.use('/api/comment', messageRouter);
};
